﻿using Lidgren.Network;
using Model.Nova;

namespace Network.Messages.Nova
{
    /// <summary>
    /// 
    /// </summary>
    public class RequsetNoManOnDutyIntroducerRegistrationMessage : NovaMessage
    {
        public RequsetNoManOnDutyIntroducerRegistrationMessage()
            : base((ushort) CustomMessageType.RequsetNoManOnDutyIntroducerRegistration)
        {
        }

        /// <summary>
        /// 记录用户输入的验证信息，及该机器的ID
        /// </summary>
        public Machine Machine { get; set; }

        public override void WritePayload(NetOutgoingMessage message)
        {
            base.WritePayload(message);
            Machine.WritePayload(message);
        }

        public override void ReadPayload(NetIncomingMessage message)
        {
            base.ReadPayload(message);
            Machine = new Machine();
            Machine.ReadPayload(message);
        }
    }
}